Solved: Change the name of a VBA form programmically. 您所在的位置:网站首页 error on rename of frm Solved: Change the name of a VBA form programmically.

Solved: Change the name of a VBA form programmically.

#Solved: Change the name of a VBA form programmically. | 来源: 网络整理| 查看: 265

I'm using VBA to create a UserForm with controls on it, That all works, however each UserForm is created with the name UserForm1, UserForm2, etc. I'm unable to programmically change the UserFrom name using:

Application.ActiveDocument.VBProject.VBComponents("UserForm1").Name = "ufMainColorForm"

I get the following error "Run-time error 75: Path/File access error"

The "Name" property seems to be read-only, i.e., I can list all the form names, just can't change any of them except manually through the IDE.

Above example is from MS Word, but Excel shows the same problem.

Any suggestions would be much appreciated.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有